#ifndef HTF_AI_BACKEND_H
#define HTF_AI_BACKEND_H

#include <stddef.h>

// Forward declare the ops struct
struct htf_ai_backend_ops;

// Generic backend handle
typedef struct htf_ai_backend {
    void* impl;                      // Pointer to the concrete backend implementation (e.g., htf_ms_backend_t)
    const struct htf_ai_backend_ops* ops; // Virtual function table
} htf_ai_backend_t;

// Backend operation function table (virtual function interface)
struct htf_ai_backend_ops {
    int (*init)(void* impl, const char* model_path);
    int (*run)(void* impl, const void* input, void* output);
    void (*destroy)(void* impl);
};

// Define an alias for convenience (optional)
typedef struct htf_ai_backend_ops htf_ai_backend_ops_t;

#endif // HTF_AI_BACKEND_H